<template>
  <div ref="container"></div>
</template>

<script setup lang="ts">
import { loadMapScript } from '@/plugins/SDK/Tmap';
import { onMounted, ref } from 'vue';

const container = ref();

function initMap() {
  // @ts-ignore
  const map = new TMap.Map(container.value, {});
}

onMounted(() => {
  loadMapScript()
    .then(() => {
      initMap();
    })
    .catch((err: any) => {
      console.error(err);
    });
});
</script>

<style scoped></style>
